<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="renderer" content="webkit">
    <meta name="keywords" content="" />
    <meta name="description" content="" />
    <meta http-equiv="Cache-Control" content="no-siteapp">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
     <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"/> 
    <meta name="force-rendering" content="webkit">   
     <title>购物车</title>
    <link rel="stylesheet" href="/asset/css/common/shop_car.css">
    <link rel="stylesheet" href="/asset/css/common/footer.css">
    <link rel="stylesheet" href="/static/css/sweetalert2.css">
    <link rel="stylesheet" href="/asset/css/common/reset.css">
    <link rel="stylesheet" href="/asset/css/common/guess_like.css">
    <link rel="icon" href="/asset/image/yczh.ico" type="image/x-icon">
</head>
<body>
    <header>
        <div class="head_top">
            <div class="head_top_content clearfix">
                <ul class="head_nav">
                    <li class="login_block">
                        <div class="login_register">
                            <a class="please_login">请登录</a>
                            <a class="free please_register">免费注册</a>
                        </div>
                        <div class="user_name_block" style="display:none">
                                <a href="http://114.116.69.140:8888/user/user_index.html" target="_blank">您好! <span class="user_name"></span></a>
                                <a class="free go_back">退出</a>
                        </div>
                    </li>
                </ul>
                <div class="top_guanzhu_ab">
                        <ul>
                            <li class="weibo">
                                <a href="https://weibo.com/u/5912031881?is_all=1" target='_blank'>新浪微博</a>
                            </li>
                            <li class="weixin">
                                关注微信
                            </li>
                        </ul>
                </div>
                <div class="weixin_img"><img src="/asset/image/weixinCode.png" alt=""></div>
            </div>
        </div>
        <div class="head_bottom clearfix">
            <h1 class="logo">
                <a href="http://114.116.69.140:8888/" target="_blank">兰考畜牧协同平台</a>
            </h1>
            <div class="nologin-tip">
                <span class="wicon"></span>
                非会员浏览器关闭清空购物车，登录会员后永久保留
                <a href="http://114.116.69.140:8888/login/login.html" target="_blank">立即登录</a>
            </div>
            <div class="head_bottom_r">
                <a></a>
                <a>在线支付免运费，支持货到付款</a>
            </div>
        </div>
    </header>
    <div id="container" v-cloak>
        <section class="main" id="main">
            <ul class="main_nav clearfix">
                <li>
                    <label v-if = "isUser" >
                        <input type="checkbox" class="checkAll"  v-model='isCheckedAll' :checked=true  @click ="checkAll"/>
                        <span>全选</span>
                    </label>
                    <label v-else >
                        <input type="checkbox" class="checkAll"  :checked='storeNoLoginGoodsId.length?storeNoLoginGoodsId.length==noUserGoodsList.length:false'  @click ="noUsercheckAll"/>
                         <span>全选</span>
                    </label>
                </li>
                <li class="goods">商品</li>
                <li class="">畜牧价</li>
                <li>购买价</li>
                <li>操作</li>
            </ul>
            <!--div是购物车内容块 ul是活动块 li标签是商品列表-->
            <div class="shop_car_list" id="shop_car_list">
                <ul v-if = "dest.length" v-for="(item,activity_index) in dest" class="shop_list" :key="activity_index" :data-activity_index='activity_index'>
                    <li :data-activity_id="item.id">
                        <div class="item clearfix">
                            <div class="active_shop">
                                 <span class="active_shop_reduce">{{item.title}}</span>
                                <!-- <span class="price"></span> -->
                                <!-- <a href="javascript:;" class="collect_bill" v-show="item.onOff==false"> >去凑单></a> -->
                            </div>
                            <a>
                                <span v-if='item.data[0].ActivityVirtualCoupon&&item.onOff&&item.data[0].Goods.promotion_flag!=1' class="coupon">{{coupon}}</span>
                            </a>
                            <div class="purchased" v-if='((item.data[0].ActivityGift&&item.data[0].ActivityGift.full_type==1&&item.marketPrice>=item.data[0].ActivityGift.order_full)||
                                    (item.data[0].ActivityGift&&item.data[0].ActivityGift.full_type==2&&item.fullPrice>=item.data[0].ActivityGift.order_full))&&(item.data[0].ActivityGift&&item.data[0].ActivityGift.gift_count>0)'>
                                <a @click="activityGift(item.data[0],item)">领取赠品</a>
                                <div class="purchased_list clearfix" v-show="giveGiftOff&&giftId == item.id">
                                    <div class="title">
                                        可领取最多{{item.data[0].ActivityGift.gift_count}}件赠品，已选
                                        <em class="purchased_num">{{giveGiftChoose.length}}</em> 件
                                        <strong @click="cancel">X</strong>
                                    </div>
                                    <ul class="purchased_goods_list" v-for="(activeGift,giftIndex) in giveGift">
                                        <li class="clearfix">
                                            <div class="cart-checkbox ">
                                                <i :class="[giveGiftChoose.includes(activeGift.Goods.id) ?  'bgColor' : 'noBgColor']" @click="selectedInput(item.data[0].ActivityGift.gift_count,activeGift.Goods.id)"></i>
                                            </div>
                                            <div class="p-img">
                                                <a :href="'http://114.116.69.140:8888/goods-'+activeGift.Goods.id+'.html'" target="_blank"><img :src="activeGift.GoodsImgs.thumb" alt=""></a>
                                            </div>
                                            <div class="p-msg">
                                                <a :href="'http://114.116.69.140:8888/goods-'+activeGift.Goods.id+'.html'" target="_blank">{{activeGift.Goods.name}}</a>
                                            </div>
                                            <div class="p-price">
                                                <strong>￥0.00</strong>
                                            </div>
                                        </li>
                                    </ul>
                                    <div class="p-btn">
                                        <a @click="submit(1,item.id)">确定</a>
                                        <a @click="cancel">取消</a>
                                    </div>
                                </div>
                            </div>
                            <div class="purchased" v-if='((item.data[0].ActivityGift&&item.data[0].ActivityGift.full_type==1&&item.marketPrice>=item.data[0].ActivityGift.order_full)||
                                    (item.data[0].ActivityGift&&item.data[0].ActivityGift.full_type==2&&item.fullPrice>=item.data[0].ActivityGift.order_full))&&(item.data[0].ActivityGift&&item.data[0].ActivityGift.add_gift_count>0)'>
                                <a @click="markUp(item.data[0],item)">加价购</a>
                                <div class="purchased_list clearfix" v-show="purchasedOff">
                                    <div class="title">
                                        可换购最多{{item.data[0].ActivityGift.add_gift_count}}件，已选
                                        <em class="purchased_num">{{markUplIistChoose.length}}</em> 件
                                        <strong @click="cancel">X</strong>
                                    </div>
                                    <ul class="purchased_goods_list" v-for="(markUp,markUp_index) in markUplIist">
                                        <li class="clearfix">
                                            <div class="cart-checkbox ">
                                                <i :class="[markUplIistChoose.includes(markUp.Goods.id) ?  'bgColor' : 'noBgColor']" @click="markUpSelectedInput(item.data[0].ActivityGift.add_gift_count,markUp.Goods.id)"></i>
                                            </div>
                                            <div class="p-img">
                                                <a :href="'http://114.116.69.140:8888/goods-'+markUp.Goods.id+'.html'" target="_blank"><img :src="markUp.GoodsImgs.thumb" alt=""></a>
                                            </div>
                                            <div class="p-msg">
                                                <a :href="'http://114.116.69.140:8888/goods-'+markUp.Goods.id+'.html'" target="_blank">{{markUp.Goods.name}}</a>
                                            </div>
                                            <div class="p-price">
                                                <strong>￥95.00</strong>
                                            </div>
                                        </li>
                                    </ul>
                                    <div class="p-btn">
                                        <a @click="submit(2,item.id)">确定</a>
                                        <a @click="cancel">取消</a>
                                    </div>
                                </div>
                            </div>
                            <div class="full_reduction full_r">
                                <span>￥<span id="total_price">{{item.total_price}}</span></span>
                                <span>减:￥<span id="reduce" class="add_color">{{item.reducePrice}}</span></span>
                                <span>小计:￥<span id="subtotal" class="subtotal">{{item.subtotal}}</span></span>
                            </div>
                        </div>
                    </li>
                    <li v-for="(shop_car,goods_index) in item.data" :key="goods_index" id="item" :data-goods_index='goods_index' :class="{activeColor:shop_car.Cart.selected_flag}">
                        <div class="item_main clearfix">
                            <input type="checkbox" class="checkbox check" @click='singleChecked(shop_car,item,goods_index)' :checked='shop_car.Cart.selected_flag' :disabled="shop_car.ActivityGiftGoods?true:false" />
                            <div class="goods_info">
                                <div class="goods_info_pic"><a :href="'/goods-'+shop_car.Goods.id+'.html'" target="_blank"><img :src="shop_car.GoodsImgs.thumb" alt=""></a> </div>
                                <div class="goods_info_text">
                                    <a :href="'/goods-'+shop_car.Goods.id+'.html'" target="_blank"><span class="msg">{{shop_car.Goods.name}}</span></a>
                                   <br/>
                                    <p v-if="shop_car.ActivityGiftGoods&&shop_car.ActivityGiftGoods.add_price==0">赠品</p>
                                    <p v-if='shop_car.ActivityGiftGoods&&shop_car.ActivityGiftGoods.add_price>0'>加价购</p>
                                    <!-- <p v-if='shop_car.Goods.promotion_flag==1'>限时特价</p>
                                    <p v-if='shop_car.Goods.new_user_promotion_flag==1'>新用户专享价</p>
                                    <p v-if='shop_car.Goods.promotion_flag!=1&&shop_car.Goods.level_promotion_flag==1'>会员等级特价</p> -->
                                </div>
                            </div>
                            <div class="sales">
                                <div :data-goods_id="shop_car.Cart.goods_id">
                                    <span class="sales_price">¥<span class="promotion_price">{{shop_car.Goods.goodsPrice}}</span></span><br/>
                                    <span ref="btn" class="sales_drop" @click="sales_drop(activity_index,goods_index,shop_car.Goods.id)" :data-activity_index='activity_index' :data-goods_index='goods_index' v-if="!shop_car.Goods.gift_flag&&shop_car.Goods.promotion_flag != 1">
                                        促销
                                        <i></i>   
                                    </span>
                                    <div class="preferential" v-if="activity_index==currentActivityIndex&&goods_index==currentGoodsIndex">
                                        <span id="sales_drop" class="sales_drop" @click="sales_drop(activity_index,goods_index,shop_car.Goods.id)" :data-activity_index='activity_index' :data-goods_index='goods_index' v-if="!shop_car.Goods.gift_flag&&shop_car.Goods.promotion_flag !== 1">
                                            促销
                                            <i></i>   
                                        </span>
                                        <ul>
                                            <li v-for="option in rules">
                                                <input type="radio" name="redio" class="redio" :checked="(shop_car.Cart.activity_selected&&shop_car.Cart.activity_id==option.id)" :activity_id="option.id" @click="selectActivity(option.id,shop_car.Cart.id)" :value="option.title">
                                                 {{option.title}}
                                            </li>
                                            <li>
                                                <input type="radio" name="redio" class="redio" :activity_id="-1" @click="selectActivity(0,shop_car.Cart.id)" :checked="shop_car.Cart.activity_id==0"   /> 不使用优惠活动
                                            </li>
                                        </ul>
                                        <div class="btns_ac">
                                            <a class="sure" @click='sure(shop_car,goods_index,item)'>确定</a>
                                            <a class="close_active" @click='close'>取消</a>
                                        </div>
                                    </div>
                                </div>
                                <div class="purchase_price">
                                   <!-- <span class="promotion_price" v-if="shop_car.Goods.level_promotion_flag!=1"> ¥{{shop_car.Goods.promotion_flag==1?shop_car.Goods.promotionPrice:shop_car.Goods.goodsPrice}}</span> -->
                                    <span class="promotion_price"> ¥{{shop_car.Goods.promotionPrice}}</span>
                                </div>
                                <div>
                                    <a class="delete" @click="deletes(item,shop_car)">删除</a>
                                    <a class="store_up" @click="storeUp(shop_car.Goods.id)">收藏</a>
                                </div>
                            </div>
                        </div>
                    </li>
                </ul>
                <ul class="shop_list" v-if = 'noUserGoodsList.length'>
                    <li v-for="(item,index) in noUserGoodsList" :key="index">
                        <div class="item_main clearfix">
                            <input type="checkbox" class="checkbox check" :checked='item.selected_flag' @click='noUsersingleChecked(item.id)' />
                            <div class="goods_info">
                                <div class="goods_info_pic"> <a :href="'/goods-'+item.id+'.html'"><img :src="item.GoodsImgs.thumb" :alt="item.name"></a> </div>
                                <div class="goods_info_text">
                                    <a :href="'/goods-'+item.id+'.html'" target="_blank"><span class="msg">{{item.name}}</span></a>
                                    <br/>
                                    <p v-if="item.ActivityGiftGoods&&item.ActivityGiftGoods.add_price==0">赠品</p>
                                    <p v-if='item.ActivityGiftGoods&&item.ActivityGiftGoods.add_price>0'>加价购</p>
                                    <!-- <p v-if='item.promotion_flag==1'>限时特价</p>
                                    <p v-if='item.new_user_promotion_flag==1'>新用户专享价</p>
                                    <p v-if='item.promotion_flag!=1&&item.level_promotion_flag==1'>会员等级特价</p> -->
                                </div>
                            </div>
                            <div class="sales">
                                <div >
                                    <span class="sales_price">¥<span class="promotion_price">{{item.goodsPrice}}</span></span><br/>
                                </div>
                                <div class="purchase_price">
                                    ¥<span class="promotion_price">{{item.promotion_flag==1?item.promotionprice:item.goodsPrice}}</span>
                                </div>
                                <div>
                                    <a class="delete" @click="noUserdeletes(item.id)">删除</a>
                                </div>
                            </div>
                        </div>
                    </li>
                </ul>
            </div>
        </section>
        <div class="settlement_price" v-if = "dest.length">
            <div class="settlement_price_center clearfix">
                <div class="choose">
                    <label>
                        <input type="checkbox" class="checkAll" v-model='isCheckedAll' @click ="checkAll"/>
                        <span>全选</span>
                    </label>
                   
                    <span @click="deleteAll">删除</span>
                </div>
                <div class="settlement_price_r">
                    <span class="selected">已选 <span class="num">{{number}}</span> 件商品</span>
                    <span class="total"> 总计（不含运费）： <span class="add_color">￥</span><span class="shop_price">{{(totalPrice)}}</span></span>
                    <a><span id="settlement" @click="submit_order" :class={color:(totalPrice)!='0.00'}> 去结算></span></a>
                </div>
            </div>
        </div>
        <div class="settlement_price" v-if="noUserGoodsList.length">
            <div class="settlement_price_center clearfix">
                <div class="choose">
                    <label>
                        <input type="checkbox" class="checkAll" :checked='storeNoLoginGoodsId.length==noUserGoodsList.length' @click ="noUsercheckAll"/>
                        <span>全选</span>
                    </label>
                    <span @click="noUserdeleteAll">删除</span>
                </div>
                <div class="settlement_price_r">
                    <span class="selected">已选 <span class="num">{{number}}</span> 件商品</span>
                    <span class="total"> 总计（不含运费）： <span class="add_color">￥</span><span class="shop_price">{{noLoginPriceString}}</span></span>
                    <a><span id="settlement" @click="noUserSubmit_order" :class={color:(number!='0')}> 去结算></span></a>
                </div>
            </div>
        </div>
    </div>
    <footer id="footer">
        <!-- 猜你喜欢 -->
        <div class="same_pic">
            <div class="group_nav">
                <span>猜你喜欢</span>
                <span class="check_btn">换一批<i class="like_more"></i></span>
            </div>
            <ul class="guess_like clearfix">

            </ul>
        </div>
    </footer>
    <footer class="foot white">
        <div style="width:1200px;margin:0 auto;">
            <ul class="friendly_link clearfix">

            </ul>
            <div class="bottom">
                <p>CopyRight  2005-2018　【兰考畜牧协同平台】　经营并保留所有权利　</p >
                <p>
                    <a href="http://si.trustutn.org/info?sn=272180803036383320098&certType=1" target="_blank"><img src="/asset/image/360chengxin.png" alt=""></a>
                    <a href="http://mingpian.360.cn/qp?query=www.yczihua.com&key=31c618a46514dee9006f7844fb906918&src=sodp" target="_blank"><img src="/asset/image/360scan.png" alt=""></a>
                    <a href="https://www.baidu.com/s?wd=www.yczihua.com@v" target="_blank"><img src="/asset/image/baiduv.png" alt=""></a>
                    <a href="https://www.alipay.com" target="_blank"><img src="/asset/image/alipay.png" alt=""></a>
                    <a href="http://www.cyberpolice.cn" target="_blank"><img src="/asset/image/wangjing.png" alt=""></a>
                    <a href="https://ss.knet.cn/verifyseal.dll?sn=e18052411011274023ypig000000&ct=df&pa=5lYNIKaaNuw191wU" target="_blank"><img src="/asset/image/cnnic.png" alt=""></a>
                    <a target="cyxyv" href="https://v.yunaq.com/certificate?domain=www.yczihua.com&from=label&code=90020"> <img src="https://aqyzmedia.yunaq.com/labels/label_sm_90020.png"></a>

                </p>
                
            </div>
        </div>
    </footer>
    <script src="/static/js/jquery-1.11.2.min-1.js"></script>
    <script src="/asset/js/common/host.js"></script>
    <script src="/static/js/promise.js"></script>
    <script src="/kefu.js"></script>s
    <script src="/static/js/es6-promise.min.js"></script>
    <script src="/static/js/sweetalert2.min.js"></script>
    <script src="/static/js/vue.js"></script>
    <script src="/asset/js/shop_car/shop_car.js"></script>
    <script src="/asset/js/common/user_info.js"></script>
    <script src="/asset/js/common/guess_like.js"></script>
    <script src="/asset/js/common/header_nav.js"></script>
    <script>Vue.config.productionTip = false</script>
</body>
</html>